import Axios from 'axios'

const axiosInstance = Axios.create({
    // https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/
    baseURL: 'http://localhost:3000/static',
    // baseURL: 'http://www.ljhong.icu:80/static',
    timeout: 2000,
});
const request = {

    getApi: function (url) {
        Axios.get(url)
            .then(
                res=>{
                    console.log(res)
                }
            )
    },
    getData:function(url){
        return axiosInstance.get('/'+url)
            // .then(res=>{
            //     console.log(res.data)
            //     return res.data;
            // })
    }

}
export default request